home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 3 / Info_Mac_1994-01.iso / Development / Source / MultiSession 1.04 Source / Core 27⁄June⁄1993 / CViewRect.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-12  |  2.6 KB  |  81 lines  |  [TEXT/KAHL]

  1. /* CViewRect.h */
  2.  
  3. #pragma once
  4.  
  5. #include "EventLoop.h"
  6.  
  7. /* forward */
  8. class CWindow;
  9. class CMenuController;
  10. class CEventLoop;
  11. class CEnclosure;
  12.  
  13. /* these are the possible hook values */
  14. enum
  15.     {
  16.         NoHookOperation = 0, /* dummy operation that doesn't get responded to */
  17.  
  18.         /* operations for scrolling things */
  19.         HScrollToLocation,HScrollLeftOne,HScrollLeftPage,HScrollRightOne,HScrollRightPage,
  20.         VScrollToLocation,VScrollUpOne,VScrollUpPage,VScrollDownOne,VScrollDownPage,
  21.  
  22.         DumbHookOperation /* place holder to reduce comma insanity */
  23.     };
  24.  
  25. /* these are values which determine where the edges of an object will */
  26. /* go when it's enclosure resizes */
  27. enum    {LeftEdgeStatic, LeftEdgeSticky, LeftEdgeCustom};
  28. enum    {TopEdgeStatic, TopEdgeSticky, TopEdgeCustom};
  29. enum    {WidthStatic, WidthSticky, WidthCustom};
  30. enum    {HeightStatic, HeightSticky, HeightCustom};
  31.  
  32. struct    CViewRect    :    CIdle
  33.     {
  34.         CWindow*            Window;
  35.         CEnclosure*        Enclosure;
  36.         MyBoolean            Suspended;
  37.         MyBoolean            Enabled;
  38.         short                    WidthResizeMode;
  39.         short                    HeightResizeMode;
  40.         short                    LeftMoveMode;
  41.         short                    TopMoveMode;
  42.         LongPoint            Start; /* where with respect to enclosure's origin */
  43.         LongPoint            Extent; /* how tall and wide is it */
  44.         LongPoint            Origin; /* with respect to window's top-left corner */
  45.         LongPoint            VisRectStart; /* what can be seen (in window-relative coordinates) */
  46.         LongPoint            VisRectExtent;
  47.         Cursor                MyCursor;
  48.         EXECUTE(MyBoolean Initialized;)
  49.  
  50.         /* */            ~CViewRect();
  51.         /* */            CViewRect();
  52.         void            IViewRect(LongPoint TheOrigin, LongPoint TheExtent,
  53.                                 CWindow* TheWindow, CEnclosure* TheEnclosure);
  54.         void            DoMouseDown(MyEventRec Event);
  55.         void            DoMouseUp(MyEventRec Event);
  56.         MyBoolean    DoKeyDown(MyEventRec Event);
  57.         void            DoKeyUp(MyEventRec Event);
  58.         MyBoolean    DoMouseMoved(MyEventRec Event);
  59.         void            DoUpdate(void);
  60.         void            DoSuspend(void);
  61.         void            DoResume(void);
  62.         void            DoDisable(void);
  63.         void            DoEnable(void);
  64.         long            Hook(short OperationID, long Operand1, long Operand2);
  65.         MyBoolean    BecomeKeyReceiver(void);
  66.         MyBoolean    RelinquishKeyReceivership(void);
  67.         MyBoolean    DoMenuCommand(ushort MenuCommandValue);
  68.         void            EnableMenuItems(void);
  69.         void            DoEnclosureResized(LongPoint EnclosureAdjust);
  70.         void            SetStickiness(short Left, short Top, short Width, short Height);
  71.         long            CustomLeftMove(void);
  72.         long            CustomTopMove(void);
  73.         long            CustomWidthChange(void);
  74.         long            CustomHeightChange(void);
  75.         void            RecalcLocations(LongPoint EnclosureVisRectStart,
  76.                                 LongPoint EnclosureVisRectExtent, LongPoint EnclosureOrigin);
  77.         void            RecalcLocsInitial(void);
  78.         void            SetUpPort(void);
  79.         LongPoint    MyGlobalToLocal(LongPoint GlobalPoint);
  80.     };
  81.